#!/usr/bin/python3
# -*- coding: utf-8 -*-
person = {"male":{"name":"Shawn"}, "female":{"name":"Betty","age":23},"children":{"name":{"first_name":"李", "last_name":{"old":"明明","now":"铭"}},"age":4}}

def list_all_dict(dict_a):
    # if isinstance(dict_a,dict) : #使用isinstance检测数据类型
    for x in range(len(dict_a)):
        temp_key = dict_a.keys()[1]
        '''[x]'''
        print(temp_key)
        print(x)
        # temp_value = dict_a[temp_key]
        # print("%s : %s" %(temp_key,temp_value))
        # list_all_dict(temp_value) #自我调用实现无限遍历


if __name__ == '__main__':
    list_all_dict(person)
